package com.ihr360.payroll.entity.staff;

import com.ihr360.common.NumberIdWithTime;
import com.ihr360.commons.model.ITemporalEntity;
import com.ihr360.payroll.config.SalaryFieldTypeEntity;

import java.util.Date;

public class SalaryProfileFieldEntity extends NumberIdWithTime implements ITemporalEntity {

    private String code;

    /** 名称 */
    private String name;

    /** 序号 */
    private int indexno = 1;

    /** 薪资项目类别 */
    protected SalaryFieldTypeEntity type;

    /**
     * Raw公式定义,预留字段，为薪资体系的计算预留
     */
    protected String formula;

    private Date effectiveAt;

    private Date invalidAt;

    /**
     * 公司薪资档案引用字段公式
     */
    private String companyReferenceFormula;


    @Override
    public Date getEffectiveAt() {
        return effectiveAt;
    }

    @Override
    public Date getInvalidAt() {
        return invalidAt;
    }

    @Override
    public void setEffectiveAt(Date effectiveAt) {
        this.effectiveAt = effectiveAt;
    }

    @Override
    public void setInvalidAt(Date invalidAt) {
        this.invalidAt = invalidAt;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIndexno() {
        return indexno;
    }

    public void setIndexno(int indexno) {
        this.indexno = indexno;
    }

    public SalaryFieldTypeEntity getType() {
        return type;
    }

    public void setType(SalaryFieldTypeEntity type) {
        this.type = type;
    }

    public String getFormula() {
        return formula;
    }

    public void setFormula(String formula) {
        this.formula = formula;
    }

    public String getCompanyReferenceFormula() {
        return companyReferenceFormula;
    }

    public void setCompanyReferenceFormula(String companyReferenceFormula) {
        this.companyReferenceFormula = companyReferenceFormula;
    }
}
